package com.zhitan.ems.alarm.enums;

public enum INTERVAL_TYPES_ENUM {
	MINUTE_10( 10,"10分总"), 
	HOURE_1( 20,"1小时"), 
	DAY_1( 30,"1DAY");
	private final Integer code;
	private final String name;
	INTERVAL_TYPES_ENUM(Integer code,String name) {
		this.name = name;
		this.code = code;
	}
	public String getName() {
		return name;
	}

	public Integer getCode() {
		return code;
	}
	public static INTERVAL_TYPES_ENUM findByCode(int _nCode) {
		for (INTERVAL_TYPES_ENUM type : INTERVAL_TYPES_ENUM.values()) {
			if (_nCode == type.code) {
				return type;
			}
		}
		return DAY_1;
	}
	
}